package com.microtf.inscription.framework.pojo.wechat.resource;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.microtf.inscription.framework.pojo.wechat.jackson.JacksonUnixTimeDeSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author guliuzhong
 */
@Data
public class NewMaterial implements Serializable {
    /**
     * 该类型的素材的总数
     */
    @JsonProperty("media_id")
    String mediaId;
    /**
     * 该类型的素材的总数
     */
    @JsonProperty("update_time")
    @JsonDeserialize(using = JacksonUnixTimeDeSerialize.class)
    Date updateTime;
    /**
     * 该类型的素材的总数
     */
    @JsonProperty("content")
    ContentWrapper content;

    @Data
    public static class ContentWrapper{
        @JsonProperty("news_item")
        List<NewMaterialItem> newsItem;
    }
}
